import f from './answer.mjs';
import { it } from 'mocha';
import { assert } from 'chai';

it('空数组: 输入 []', () => {
  assert.deepEqual(f([]), []);
});

it('已排序好的数组: 输入 [1, 2, 3, 4, 5, 6, 7, 8, 9]', () => {
  assert.deepEqual(f([1, 2, 3, 4, 5, 6, 7, 8, 9]), [1, 2, 3, 4, 5, 6, 7, 8, 9]);
});

it('乱序数组一: 输入 [1, 9, 2, 4, 3, 7, 6, 8, 5]', () => {
  assert.deepEqual(f([1, 9, 2, 4, 3, 7, 6, 8, 5]), [1, 2, 3, 4, 5, 6, 7, 8, 9]);
});

it('乱序数组二-包含负数: 输入 [1, 1, 1, 3, 4, 5, 7, 6, 6, 6, 0, 0, -1]', () => {
  assert.deepEqual(
    f([1, 1, 1, 3, 4, 5, 7, 6, 6, 6, 0, 0, -1]),
    [-1, 0, 0, 1, 1, 1, 3, 4, 5, 6, 6, 6, 7]
  );
});
